﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.IO.Ports;
using System.Text;
using CelLibrary;

namespace RequestService
{
    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {

            SerialPort puerto = Class1.OpenPort("COM1", 9600, 8, 5,3);
            if (!puerto.Equals(null))
            {
                Class1.SmsHandler(puerto);
            }
        }

        protected override void OnStop()
        {
        }
    }
}
